package com.itheima.d7_thread_pool;

import java.util.concurrent.Callable;

public class MyCallabele implements Callable<String> {

    private int n;
    public MyCallabele(int n) {
        this.n = n;
    }

    @Override
    public String call() throws Exception {
        int sum =0;
        for (int i = 1; i <= n; i++) {
            sum+= i;
        }
        return "线程求出了和为："+sum;
    }
}
